<?php
declare(strict_types=1);
/**
 * MineAdmin is committed to providing solutions for quickly building web applications
 * Please view the LICENSE file that was distributed with this source code,
 * For the full copyright and license information.
 * Thank you very much for using MineAdmin.
 *
 * @Author X.Mo<root@imoi.cn>
 * @Link   https://gitee.com/xmo/MineAdmin
 */
namespace Plugin\Attractions\Broadcast\Request\Broadcast_plans;

use Hyperf\Validation\Request\FormRequest;

/**
 * 广播计划配置验证数据类
 */
class BroadcastPlansRequest extends FormRequest
{

    public function authorize(): bool
    {
        return true;
    }


    /**
     * 新增数据验证规则
     * return array
     */
    public function rules(): array
    {
        return [
            //重复类型：1-不重复，2-每天，3-每周，4-每月 验证
            // 'repeat_type' => 'required',
            //重复次数 验证
            // 'repeat_count' => 'required',

        ];
    }


    /**
     * 字段映射名称
     * return array
     */
    public function attributes(): array
    {
        return [
            'id' => '主键ID',
            'repeat_type' => '重复类型：1-不重复，2-每天，3-每周，4-每月',
            'repeat_count' => '重复次数',
            'volume_day' => '音量',
            'plan_status' => '计划状态：1-草稿，2-待执行，3-执行中，4-已取消',

        ];
    }

public function messages(): array
{
    return [
            'id.required' => '必填主键ID',
            'repeat_type.required' => '必填重复类型：1-不重复，2-每天，3-每周，4-每月',
            'repeat_count.required' => '必填重复次数',
            'volume_day.required' => '必填音量',
            'plan_status.required' => '必填计划状态：1-草稿，2-待执行，3-执行中，4-已取消',

    ];
}
}